package com.itheima.homework5;

import java.util.ArrayList;

public class Demo5 {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
        Student s1 = new Student("吕布","001",18);
        Student s2 = new Student("赵云","002",19);
        Student s3 = new Student("典韦","003",20);
        list.add(s1);
        list.add(s2);
        list.add(s3);
        //增强for遍历
        for (Student stu : list) {
            System.out.println(stu);
        }
    }
}
